package com.sky.service;

import com.sky.dto.EmployeeDTO;
import com.sky.dto.EmployeeLoginDTO;
import com.sky.dto.EmployeePageQueryDTO;
import com.sky.entity.Employee;
import com.sky.result.PageResult;
import com.sky.result.Result;

import javax.servlet.http.HttpServletRequest;

public interface EmployeeService {

    /**
     * 员工登录
     *
     * @param employeeLoginDTO
     * @return employee
     * @info 用于实现EmployeeService接口的service类重写此方法
     */
    public Employee login(EmployeeLoginDTO employeeLoginDTO);

    /**
     * 新增员工
     *
     * @return void
     * @Param employee
     * @info 用于实现EmployeeService接口的service类重写此方法
     */
    public void addEmployee(EmployeeDTO employeeDTO, HttpServletRequest request);

    /**
     * 查询所有员工(支持分页查询、条件查询)
     *
     * @return pageResult
     * @Param employeePageQueryDTO
     * @info 用于实现EmployeeService接口的service类重写此方法
     */
    public PageResult fetchAllEmployees(EmployeePageQueryDTO employeePageQueryDTO);

    /**
     * 删除员工
     *
     * @return void
     * @Param id
     * @info 用于实现EmployeeService接口的service类重写此方法
     */
    public void deleteEmployee(Long id);


    /**
     * 修改员工的启用或者禁用状态
     *
     * @param status
     * @param id
     * @return void
     * @info 用于实现EmployeeService接口的service类重写此方法
     */
    public void openOrCloseEmployeeStatus(Integer status, Long id);

    /**
     * 查询员工
     *
     * @param id
     * @return employee
     * @info 用于实现EmployeeService接口的service类重写此方法
     */
    public Employee fetchEmployeeById(Long id);

    /**
     * 编辑员工
     *
     * @param employee
     * @return void
     * @info 用于实现EmployeeService接口的service类重写此方法
     */
    public void updateEmployee(EmployeeDTO employeeDTO);
}
